import request from "@/utils/request";

// 获取地图数据
export const getBaseMap = (params: any) => {
  return request({
    url: "/screen/secondHouse/getBaseMap",
    method: "get",
    params: params,
  });
};

// 获取当前code下区域列表
export const getRegionList = (params: any) => {
  return request({
    url: "/screen/houseLease/getRegionList",
    method: "get",
    params: params,
  });
};

// 获取当前页面基础下拉列表
export const getBaseDropDown = (params: any) => {
  return request({
    url: "/screen/houseLease/getBaseDropDown",
    method: "get",
    params: params,
  });
};

// 获取租赁人员年龄分布
export const getHouseLeaseAgeDistributed = (params: any) => {
  return request({
    url: "/screen/houseLease/getHouseLeaseAgeDistributed",
    method: "post",
    data: params,
  });
};

// 获取租赁男女比例
export const getLeaseSexProportion = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeaseSexProportion",
    method: "post",
    data: params,
  });
};

// 获取租赁市场供需走势
export const getLeaseSupplyDemandTrend = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeaseSupplyDemandTrend",
    method: "post",
    data: params,
  });
};

// 获取各地租赁均价走势
export const getRegionLeaseTrend = (params: any) => {
  return request({
    url: "/screen/houseLease/getRegionLeaseTrend",
    method: "post",
    data: params,
  });
};

// 获取不同房屋性质月平均租金对比统计
export const getDiffHouseNatureAvg = (params: any) => {
  return request({
    url: "/screen/houseLease/getDiffHouseNatureAvg",
    method: "post",
    data: params,
  });
};

//获取总量数据 传值 queryDate 当前月份 / cityCode
export const getLeaseBaseData = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeaseBaseData",
    method: "post",
    data: params,
  });
};

//  商品房总量变化分析
export const getPersonHouseCommodity = (params: any) => {
  return request({
    url: "/screen/personHouse/personHouseCommodity",
    method: "post",
    data: params,
  });
};

//  获取租赁房屋管理数据分析 数据：0出租面积 1出租套数 2 名称 3年月 4租售比 5租赁饱和度  6出租面积同比 7出租面积环比  8出租套数同比 9出租套数环比
export const getLeaseHouseDataAnalyze = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeaseHouseDataAnalyze",
    method: "post",
    data: params,
  });
};

// 获取省内新增租赁人员户籍来源排名
export const getLeasePersonSourceRank = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeasePersonSourceRank",
    method: "post",
    data: params,
  });
};

// 获取租赁房源信息分布统计 传值：mjlx 面积类型 hx 户型 queryDate 查询日期 cityCode 城市code
export const getLeaseDistributedStatistics = (params: any) => {
  return request({
    url: "/screen/houseLease/getLeaseDistributedStatistics",
    method: "post",
    data: params,
  });
};
